package cn.liyiming.bbs.config;

import com.alibaba.druid.pool.DruidDataSource;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @program: bbs
 * @description: 配置数据源
 * @author: 李一鸣
 * @create: 2020-02-22 22:05
 **/

@Configuration
public class DataSourceConfig {
    @Bean
    @ConfigurationProperties(prefix = "spring.datasource")
    public DruidDataSource DataSource() {
        return new DruidDataSource();
    }
}
